package org.aeon.heroicsagatextedition.output;

import org.aeon.heroicsagatextedition.utils.StringUtils;

/**
 * @projectName: HeroicSagaTextEdition
 * @package: org.aeon.heroicsagatextedition.output
 * @className: SOutUtil
 * @author: MissingAeon
 * @date: 2023/12/27 14:14
 * @description:
 */
public class SOutUtil implements GameOutput {
    public void print(boolean isLineBreak, String str) {
        System.out.print(str);
        if (isLineBreak) {
            System.out.println();
        }
    }

    @Override
    public void print(boolean isLineBreak, String... args) {
        for (String arg : args) {
            System.out.print(arg);
        }
        if (isLineBreak) {
            System.out.println();
        }
    }

    @Override
    public void print(String... args) {
        print(true, args);
    }

    @Override
    public void print(Object... args) {
        print(true, StringUtils.arrayToString(args));
    }
}
